use crate::handlers::perm_handler as PermHandler;
use actix_web::{web, Scope};

pub struct PermRoutes;

impl PermRoutes {
    pub fn init() -> Scope {
        web::scope("/perm")
            .route("/create", web::post().to(PermHandler::create))
            .route("/delete", web::post().to(PermHandler::delete))
            .route("/update", web::post().to(PermHandler::update))
            .route("/detail", web::get().to(PermHandler::detail))
            .route("/list", web::get().to(PermHandler::list))
    }
}
